<html lang="zh_CN">
    <head>
        <title>课程表查询系统</title>
        <meta charset="utf-8">
        <link rel="stylesheet" href="../static/css/change_password.css">
    </head>
    <script type="text/JavaScript">
    window.onload = function () {
        var tanchu = "{{ tanchu }}"
        if (tanchu == '01!=00') {
            alert('您前后两次输入的新密码不一致，请确认新密码后重新输入')
        }
        else if (tanchu == 'old=new0'||tanchu == 'old=new1'){
            alert('您输入的新密码与旧密码相同，请确认新密码后重新输入')
        }
        else if (tanchu == '1') {
            alert('您输入的旧密码与原先密码并不一致，请重新输入')
            
        }
        
    }
    </script>
    <body>
        <div id="bg">
            <img src="../static/img/star.jpeg">
            <form action="/check" method="POST">
                <div id="un">
                    <div class="titles"><p>请输入旧密码:</p></div>
                    <div class="inputs">
                        <input type="text" placeholder="请输入旧密码" name="old_pw" required="required">
                    </div>
                </div>
                <div id="pw">
                    <div class="titles"><p>请输入新密码:</p></div>
                    <div class="inputs">
                        <input type="password" placeholder="请输入新密码" name="new_pw0"  required="required">
                    </div>
                </div>
                <div id="pw">
                    <div class="titles"><p>请确认新密码:</p></div>
                    <div class="inputs">
                        <input type="password" placeholder="请确认新密码" name="new_pw1"  required="required">
                    </div>
                </div>
                <div class="s">
                    <input type="hidden" name="user" value="{{user}}">
                </div>
                <div class="s">
                    <input type="hidden" name="password" value="{{password}}">
                </div>
                <div id="sign">
                    <input type="submit" name="change"  value="更改密码">
                </div>

            </form>
        </div>
    </body>
</html>